﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BP.Frm
{
    public partial class FrmDiscipliny : System.Windows.Forms.Form
    {
        private List<string> _discipliny;

        public FrmDiscipliny(List<string> discipliny)
        {
            _discipliny = discipliny;
            InitializeComponent();
        }

        private void FrmDiscipliny_Load(object sender, EventArgs e)
        {
            List<string> discipliny = _discipliny;
            string[] zkratka=null;
            zkratka = discipliny.ToArray();    
            var frmSou = new FrmSoutez();
            
                for (int i = 0; i < zkratka.Length; i++)
                {
                    CheckBox cb = new CheckBox { Location = new Point { X = 20, Y = 22 * i } };

                    cb.Name = "cb" + i;
                    cb.Text = zkratka[i];
                    this.Controls.Add(cb);
                }
               /*
            for (int i = 0; i < zkratka.Length; i++)
            {
                CheckBox cb = new CheckBox { Location = new Point { X = 20, Y = 22 * i } };

                cb.Name = "cb" + i;
               
                cb.Text = zkratka[i];
                groupBox1.Controls.Add(cb);
            }
            */
        }
    }
}
